#ifndef CONTAINER_H_INCLUDED
#define CONTAINER_H_INCLUDED

#include "src/common/be_event_system.h"
#include "../utils/execcmd.h"
#include "widget.h"

class Container : public Widget
{
	public:
		Container();
		~Container();
		void	draw();

		// children map, publically accessible
		std::map<std::string, Widget*> children;
		bool	mouseOverChild( Widget** fWidget, int x, int y );

		Execcmd cmd;
		Widget* addWidgetPanel( const std::string& name, Widget* nwidget );
		void updateAbsPosition();
		
	protected:
		void	drawChildren();

		Widget* addWidgetText( const std::string& name, unsigned int posx, unsigned int posy, const std::string& textstring );
		Widget* addWidgetText( const std::string& name, const std::string& textstring );
		Widget* addWidgetText( const std::string& name, unsigned int posx, unsigned int posy, const unsigned int* uintp );
		Widget*	addWidgetButton( const std::string& name, const Vector2i& pos, const Vector2i& dimensions, const std::string& textstring, const Vector2i& textpos, const cmdsettings& cmds, EventProperty_Repeat repeat, unsigned int delay );
		Widget*	addWidgetButton( const std::string& name, const Vector2i& pos, const Vector2i& dimensions, const std::string& textstring, const cmdsettings& cmds, EventProperty_Repeat repeat, unsigned int delay );

		Widget*	addWidgetCheckbox( const std::string& name, const Vector2i& pos, const Vector2i& dimensions, const std::string& textstring, const Vector2i& textpos, const cmdsettings& cmds, EventProperty_Repeat repeat, unsigned int delay );
		Widget* addWidgetCheckbox( const std::string& name, const Vector2i& pos, const Vector2i& dimensions, const std::string& textstring, const Vector2i& textpos, const cmdsettings& cmds, const std::string& settingname, EventProperty_Repeat repeat, unsigned int delay );

		// children map iterator
		typedef std::map <std::string, Widget*>::const_iterator children_iterator;
		children_iterator childit;

	private:

};

#endif
